package com.Day8;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Copyright (C), 2018-2021, 若若叶
 * Author: Hx162
 * Date: 2021/7/16 12:15
 * FileName: MyException
 * Description: 关于异常
 */
public class MyException {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            //文件输入流
            fis = new FileInputStream("E:\\Tools\\apache-maven-3.6.1\\conf\\settings.text");
        } catch (FileNotFoundException e) {
            //处理异常
            e.printStackTrace();
        }finally {
            if (fis!=null){
                try {
                    //关闭流
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
